<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="AvatareEditDlg" widgetVar="AvatareEditDialog" modal="true" resizable="false"  appendTo="@(body)" header="#{myBundle.EditAvatareTitle}" closeOnEscape="true">

            <h:form id="AvatareEditForm">

                <h:panelGroup id="display">
                    <p:panelGrid  columns="2" rendered="#{avatareController.selected != null}">

                        <h:outputLabel value="#{myBundle.EditAvatareLabel_id}" for="id" />
                        <h:outputText id="id" value="#{avatareController.selected.id}" />


                        <p:outputLabel value="#{myBundle.EditAvatareLabel_filename}" for="filename" />
                        <p:inputText id="filename" value="#{avatareController.selected.filename}" title="#{myBundle.EditAvatareTitle_filename}" required="true" requiredMessage="#{myBundle.EditAvatareRequiredMessage_filename}" size="100" maxlength="100"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{avatareController.save}" value="#{myBundle.Save}" update="display,:AvatareListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,AvatareEditDialog);">
                        <p:confirm header="#{myBundle.ConfirmationHeader}" message="#{myBundle.ConfirmEditMessage}" icon="ui-icon-alert"/>
                    </p:commandButton>
                    <p:commandButton value="#{myBundle.Cancel}" onclick="AvatareEditDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
